package gunfire.cards;

import basemod.abstracts.CustomCard;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import gunfire.GunfireMod;
import gunfire.actions.ElementalEffectAction;

import static gunfire.GunfireMod.makeCardPath;

public class ElementGlove0 extends CustomCard {

    public static final String ID = GunfireMod.makeID(ElementGlove0.class.getSimpleName());
    private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    public static final String NAME = cardStrings.NAME;
    public static final String DESCRIPTION = cardStrings.DESCRIPTION;
    public static final String IMG = makeCardPath("ElementGlove0.png");
    private static final CardRarity RARITY = CardRarity.SPECIAL;
    private static final CardType TYPE = CardType.SKILL;
    private static final CardTarget TARGET = CardTarget.ENEMY;
    public static final CardColor COLOR = CardColor.COLORLESS;
    private static final int COST = 0;
    private AbstractPlayer p = null;
    private AbstractMonster m = null;

    public ElementGlove0() {
        super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET);
        this.baseMagicNumber = this.magicNumber = 2;
    }

    public ElementGlove0(AbstractPlayer p, AbstractMonster m) {
        super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET);
        this.baseMagicNumber = this.magicNumber = 2;
        this.p = p;
        this.m = m;
    }

    @Override
    public void upgrade() {
        if (!this.upgraded) {
            this.upgradeName();
        }
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        this.onChoseThisOption();
    }

    @Override
    public void onChoseThisOption() {
        this.addToTop(new ElementalEffectAction(this.m, this.p, this.magicNumber, GunfireMod.ElementalEffect.Burning));
    }

    @Override
    public AbstractCard makeCopy() {
        return new ElementGlove0();
    }
}
